<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:a="http://richfaces.org/a4j" contentType="text/html">
	<a4j:loadBundle var="msg" basename="messages"/>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>fenoco</title>
		<link href="#{request.contextPath}/css/estilos.css" type="text/css" rel="stylesheet" media="screen" />
		<script src="js/hora_fecha.js"></script>
		<script language="javascript" type="text/javascript">  
			window.onload = muestraReloj;  
		    if (document.captureEvents) {           //N4 requiere invocar la funcion captureEvents  
		        document.captureEvents(Event.LOAD);
		    }  
		</script>  
		<ui:insert name="head" />
	</head>
	<body>
		
		<div id="main_background" >
			<div id="main_container">
		
				<div>
					<div class="header">
						<img src="img/Logo.png" />
					</div>
					
					<div class="subHeader">
						<h:form id="commandLink">
							<table width="100%">
								<tr>
									<td align="left" width="50%">
										<h:panelGrid columns="4" rendered="#{Autenticacion.loggedIn}">
											<h:graphicImage value="img/user.gif" />
											<h:outputText value="#{Autenticacion.usuario.nombres}  ">
											</h:outputText>
											|  <span id="spanreloj" style="display: inline;"></span>  
											|  <span id="fecha_reloj" style="display: inline;"></span>  
										</h:panelGrid>
										<h:panelGrid columns="2" rendered="#{!Autenticacion.loggedIn}">
											<h:graphicImage value="img/sign_in.png" />
											<h:outputLink id="iniciar" value="login.jsf">
												<h:outputText value="Iniciar Sesion" />
											</h:outputLink>
										</h:panelGrid>
									</td>
									<td align="right" width="50%">
										<h:panelGrid columns="2" rendered="#{Autenticacion.loggedIn}">
											<h:graphicImage value="img/sign_out.png" />
											<h:commandLink value="Cerrar Sesion" action="#{Autenticacion.cerrarSesion}">
											</h:commandLink>
										</h:panelGrid>
									</td>
								</tr>
							</table>
						</h:form>
					</div>
				</div>
				
				<div id="main-copy">
					
					<div>
						<rich:messages id="messages" globalOnly="true"
							styleClass="mensajes_error_background mensajes_error"
							rendered="#{showGlobalMessages != 'false'}" ajaxRendered="true"
							infoLabelClass="info_texto" warnLabelClass="warn_texto"
							errorLabelClass="error_texto" infoMarkerClass="infoimg"
							warnMarkerClass="warnimg" errorMarkerClass="errorimg">
							<f:facet name="infoMarker">
								<h:graphicImage url="/img/passed.gif" />
							</f:facet>
							<f:facet name="warnMarker">
								<h:graphicImage url="/common/img/msgwarn.png" />
							</f:facet>
							<f:facet name="errorMarker">
								<h:graphicImage url="/img/error.png" />
							</f:facet>
							<f:facet name="fatalMarker">
								<h:graphicImage url="/img/error.png" />
							</f:facet>
						</rich:messages>
					</div>
				
					<h1 id="introduction">
						<ui:insert name="pageTitle" />
					</h1>
					<p>
						<ui:insert name="body" />
					</p>
				</div>
				
				<div id="footer">
					<div class="left">
						Fenoco .: Derechos Reservados :.
						<br/>
						Contactenos <a href="mailto:contacto@codigofacil.com">contacto@codigofacil.com</a>
					</div>
					
					<br class="doNotDisplay doNotPrint" />
					
					<div class="right">
						
					</div>
				</div>
			
			</div>
		</div>
		<script language="JavaScript" type="text/javascript">  
			MostrarFecha();  
		</script>
	</body>

</f:view>
